<template>
  <!-- 作用域插槽 -->
  <ul>
    <li v-for="(item,index) in list">
      <slot :item="item" :index="index"></slot>
    </li>
  </ul>
</template>

<script>
  export default {
    name: "scoped-slot",
    data() {
      return {
        list: [
          '面包',
          '牛奶',
          '巧克力'
        ]
      }
    }
  }
</script>

<style scoped>

</style>
